package com.woniuxy.controller;

import com.woniuxy.entity.dto.FapiaoDTO;
import com.woniuxy.service.FapiaoService;
import com.woniuxy.util.PageData;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: tsm
 * @description:
 * @create: 2024-10-25 15:40
 **/
@RestController
@RequestMapping("/fapiao")
public class FapiaoController {
    @Autowired
    private FapiaoService fapiaoService;
    @PostMapping("/queryFapiao")
    public ResponseData<?> queryFapiao(@RequestBody PageData<FapiaoDTO> pageData){
        return fapiaoService.queryFapiao(pageData);
    }

    @PostMapping("/add")
    public ResponseData<?> add(@RequestBody FapiaoDTO fapiaoDTO){
        return fapiaoService.add(fapiaoDTO);
    }
}
